home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-16 | 2.0 KB | 83 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: CELibInit.cpp
- // Release Version: $ ODF 3 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef CEPRVGLU_H
- #include "CEPrvGlu.h"
- #endif
-
- //========================================================================================
- // Prototypes
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
-
- extern "C" pascal OSErr CE_CFMINIT (CFragInitBlockPtr initBlkPtr);
- extern "C" pascal void CE_CFMTERM (void);
-
- #ifdef __MWERKS__
- # if __MWERKS__ < 0x0800
- extern "C" void __sinit();
- extern "C" void __destroy_global_chain(void);
- # else
- extern "C" short __initialize();
- extern "C" void __terminate(void);
- # endif
- #elif defined __MRC__
- extern "C" __init_lib(CFragInitBlockPtr initBlkPtr);
- #endif
-
- #endif // FW_BUILD_MAC
-
-
- #ifdef FW_BUILD_MAC
- //----------------------------------------------------------------------------------------
- // CE_CFMINIT (Has to be upper case because of the 68K Linker)
- //----------------------------------------------------------------------------------------
-
- extern "C" pascal OSErr CE_CFMINIT(CFragInitBlockPtr initBlkPtr)
- {
- OSErr err = noErr;
-
- // Shared libraries don't get there static objects initialized correctly without
- // calling __initialize or __init_lib for MetroWerks or MrC respectively.
-
- #ifdef __MWERKS__
- #if __MWERKS__ < 0x0800
- __sinit();
- #else
- __initialize();
- #endif
- #elif defined __MRC__
- __init_lib(initBlkPtr);
- #endif
- return err;
- }
-
- #endif
-
- #ifdef FW_BUILD_MAC
- //----------------------------------------------------------------------------------------
- // CE_CFMTERM
- //----------------------------------------------------------------------------------------
-
- extern "C" pascal void CE_CFMTERM(void)
- {
- #ifdef __MWERKS__
- # if __MWERKS__ < 0x0800
- __destroy_global_chain();
- # else
- __terminate();
- # endif
- #endif
- }
-
- #endif
-
-
-